# /usr/bin/python
# ! -*- coding:UTF-8 -*-


# 定义一个类，保存button，和被选择的状态
class iButton:
    _button = None
    _selected = False
    _x = 0
    _y = 0

    def __init__(self, button, selected, x, y):
        self._button = button
        self._selected = selected
        self._x = x
        self._y = y

    def get_button(self):
        return self._button

    def set_selected(self, selected):
        self._selected = selected

    def get_selected(self):
        return self._selected

    def get_x(self):
        return self._x

    def get_y(self):
        return self._y

    def __str__(self):
        # return "[button=" + self._button + ",selected=" + self._selected + ",x=" + self._x + ",y=" + self._y + "]"
        return "[button=%s,selected=%s,x=%s,y=%s]" % (self._button, self._selected, self._x, self._y)
